package com.jzo2o.trade.controller;

import com.jzo2o.api.trade.dto.request.PayReqDTO;
import com.jzo2o.api.trade.dto.response.PayResDTO;
import com.jzo2o.trade.service.IPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/inner")
@Slf4j
public class PayController {
    @Resource
    private IPayService payService;
    @PostMapping("/pay")
    public PayResDTO pay(@RequestBody PayReqDTO reqDTO) {
        log.info("开始处理支付请求");
        return payService.pay(reqDTO);
    }
}
